package year2019.month08910;

/**
 * @desc 描述
 * create on 2019/8/2 by watson
 */
public class StringDealTest {

    public static void main(String[] args){
        test();
    }

    public static void test(){
        String str = "abcdefg";

        char[] chars = str.toCharArray();
        char[] newChars = new char[chars.length];
        for (int i=chars.length-1, n=0; i>=0; i--, n++){
            newChars[n]=chars[i];
        }

        String newStr = String.valueOf(newChars);

        System.out.println(newStr);
    }

}
